package com.st.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 课程购买记录对象 st_purchase_records
 *
 * @author zhw
 * @date 2024-10-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("st_purchase_records")
public class StPurchaseRecords implements Serializable
        {
private static final long serialVersionUID = 1L;

    /** 编号 */
        @TableId(value="id",type=IdType.AUTO)
    private Integer id;

    /** 内部订单编号 */
            @Excel(name = "内部订单编号")
        @TableField(value = "internal_order_no")
    private String internalOrderNo;

    /** 微信订单号 */
            @Excel(name = "微信订单号")
        @TableField(value = "wechat_order_no")
    private String wechatOrderNo;

    /** 订单状态 */
            @Excel(name = "订单状态")
        @TableField(value = "order_status")
    private Integer orderStatus;

    /** 课程 */
            @Excel(name = "课程")
        @TableField(value = "course_id")
    private Integer courseId;

    /** 课程价格 */
            @Excel(name = "课程价格")
        @TableField(value = "price")
    private BigDecimal price;

    /** 课程名称 */
            @Excel(name = "课程名称")
        @TableField(value = "course_name")
    private String courseName;

    /** 下单时间 */
            @JsonFormat(pattern = "yyyy-MM-dd")
            @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
        @TableField(value = "order_time")
    private Date orderTime;

    /** 支付时间 */
            @JsonFormat(pattern = "yyyy-MM-dd")
            @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
        @TableField(value = "payment_time")
    private Date paymentTime;

    /** 用户 */
            @Excel(name = "用户")
        @TableField(value = "user_id")
    private Integer userId;

            @TableField(exist = false)
            private String courseImg;



}
